<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Manuel S. Enverga University : Web-based Integrated Information System</title>
<link rel="shortcut icon" href="{dir_image}favicon.ico">
<link rel="stylesheet" type="text/css" href="{dir_css}Popup.css" />
<script type="text/javascript" src="{dir_js}jquery.min.js"></script>
<script type="text/javascript" language="javascript">
	$(document).ready(function() {
		
		$('#filePhoto').change(function(){
			$('#my_picture').html('<img src="./application/images/loading_bar.gif" border="0" width="120" height="12"/>');
			 $('#submitHidden').val('1');
			var filename_path = $(this).val();
			var filename = filename_path.split('\\').pop().split('/').pop();
		   $('#file_selected_name').text(filename);
		   $('#upload_form').submit();
		});
	});
	
	function deletePicture(strFileName) {
		$.post('request.php?request=iFrame', {AJAXPost:'deletePicture', fileName:strFileName}, function() {
			window.location.href = window.location.href;
		});
	}
	
	function parentRefresh() {
		parent.window.location.href = parent.window.location.href;
	}
</script>
</head>
<body>
	<div class="title-frame">Change your Primary Photo.</div>
	<div class="title-sub">Max Size 1MB | *.jpg, *.png or *.gif format only</div>
	<div class="popup-spacer"></div>
	<form method="post" enctype="multipart/form-data" action="" id="upload_form">
	<input type="hidden" name="submitHidden" id="submitHidden" value="0"/>
	<input type="hidden" name="saveFileName" value="{saveFileName}"/>
		<table width="480" border="0" cellspacing="0" cellpadding="0">
			<tr valign="top">
				<td width="110" height="28">Browse Picture<span class="required-field">*</span></td>
				<td width="10">:</td>
				<td width="390">
					<div id="file_path"></div>
					<div class="file-upload-main">
						<div class="button-upload">
							<div class="button-file-button">Browse</div>
							<div class="button-file-text" id="file_selected_name">No File Selected...</div>
							<input type="file" name="filePhoto" id="filePhoto" class="file-upload-input"/>
						</div>
					</div>
					<span class="required-field">{uploadError}</span>
                </td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td height="1"><div id="my_picture">{myPicture}</div></td>
			</tr>
			<tr> <td height="8" colspan="3"></td></tr>
			<tr>
				<td height="28"></td>
				<td></td>
				<td><input type="submit" name="subButton" id="subButton" class="submit-input" value="Upload"/> <span class="record-saved-color">{saved_record}</span></td>
			</tr>
		</table>
	</form>
	<div class="popup-spacer"></div>
	<div class="message-content"></div>
</body>
</html>
